import store from '@/store'

//判断当前用户是否具有这个按钮权限 rbac:user:add
export default function hasBtnPermission(permission) {
  //获取当前用户所有的按钮权限
  let myBtns = store.getters.btns;
  //['rbac:user:add','rbac:user:query']
  return myBtns.indexOf(permission) !== -1
}